import {
  MessageBox,
  Message
} from 'element-ui'

export function confirm(title, t) {
  MessageBox.confirm(title, ' 是否继续?', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    t()
  }).catch(() => {
    message("success", "已取消该操作！")
  });
}

export function message(type, message) {
  Message({
    type: type,
    message: message
  });
}
